Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streamline parents lookup per run. #463

Merged
merged 5 commits into from
Apr 14, 2022
Merged

streamline parents lookup per run. #463

merged 5 commits into from
Apr 14, 2022

Conversation

sephirothkod
Copy link
Contributor

remove database column for parents and just use relationships look up each time.

@cla-bot cla-bot bot added the cla-signed label Apr 13, 2022
# Conflicts:
#	app/models/bulkrax/importer_run.rb
#	app/models/concerns/bulkrax/import_behavior.rb
#	db/migrate/20220301020307_add_parents_to_bulkrax_importer_runs.rb
@@ -5,6 +5,8 @@ class ImporterRun < ApplicationRecord
belongs_to :importer
has_many :statuses, as: :runnable, dependent: :destroy

serialize :parents, Array
def parents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this get called now with importer.last_run.parents in the schedule relationships job?

@@ -5,6 +5,8 @@ class ImporterRun < ApplicationRecord
belongs_to :importer
has_many :statuses, as: :runnable, dependent: :destroy

serialize :parents, Array
def parents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this get called now with importer.last_run.parents in the schedule relationships job?

Copy link
Contributor Author

@sephirothkod sephirothkod Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes; that is the idea at least.

Copy link
Contributor

@alishaevn alishaevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is working for me locally in louisville

@alishaevn alishaevn merged commit 3eeddda into main Apr 14, 2022
@alishaevn alishaevn deleted the parents_fix branch August 5, 2022 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants